
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>链表原来如此简单 · 👨🏽‍💻前端漫游指南</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="WuXiaolong">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-toggle-chapters/toggle.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../Vue/" />
    
    
    <link rel="prev" href="LRU算法.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                        <b>1.1.</b>
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Base/">
            
                <a href="../Base/">
            
                    
                        <b>1.2.</b>
                    
                    前端基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Base/">
            
                <a href="../Base/">
            
                    
                        <b>1.2.1.</b>
                    
                    原生js系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="../Base/手写call1.html">
            
                <a href="../Base/手写call1.html">
            
                    
                        <b>1.2.1.1.</b>
                    
                    类型转换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2" data-path="../Base/EventLoop.html">
            
                <a href="../Base/EventLoop.html">
            
                    
                        <b>1.2.1.2.</b>
                    
                    EventLoop
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../Base/CSS.html">
            
                <a href="../Base/CSS.html">
            
                    
                        <b>1.2.2.</b>
                    
                    CSS系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="../Base/布局系列.html">
            
                <a href="../Base/布局系列.html">
            
                    
                        <b>1.2.2.1.</b>
                    
                    布局系列
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../Design/">
            
                <a href="../Design/">
            
                    
                        <b>1.3.</b>
                    
                    前端设计模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Design/工程模式.html">
            
                <a href="../Design/工程模式.html">
            
                    
                        <b>1.3.1.</b>
                    
                    工厂模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../Design/单一模式.html">
            
                <a href="../Design/单一模式.html">
            
                    
                        <b>1.3.2.</b>
                    
                    单一模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../DiyCode/">
            
                <a href="../DiyCode/">
            
                    
                        <b>1.4.</b>
                    
                    手撕代码
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../DiyCode/手写call.html">
            
                <a href="../DiyCode/手写call.html">
            
                    
                        <b>1.4.1.</b>
                    
                    手写call
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../DiyCode/手写bind.html">
            
                <a href="../DiyCode/手写bind.html">
            
                    
                        <b>1.4.2.</b>
                    
                    手写bind
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="./">
            
                <a href="./">
            
                    
                        <b>1.5.</b>
                    
                    前端算法
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="前端算法.html">
            
                <a href="前端算法.html">
            
                    
                        <b>1.5.1.</b>
                    
                    前端算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="统计算法的执行效率和资源消耗.html">
            
                <a href="统计算法的执行效率和资源消耗.html">
            
                    
                        <b>1.5.2.</b>
                    
                    统计算法的执行效率和资源消耗
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="从Chrome V8源码看JavaScript数组.html">
            
                <a href="从Chrome V8源码看JavaScript数组.html">
            
                    
                        <b>1.5.3.</b>
                    
                    从Chrome V8源码看JavaScript数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="LRU算法.html">
            
                <a href="LRU算法.html">
            
                    
                        <b>1.5.4.</b>
                    
                    LRU算法
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5.5" data-path="链表原来如此简单.html">
            
                <a href="链表原来如此简单.html">
            
                    
                        <b>1.5.5.</b>
                    
                    链表原来如此简单
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../Vue/">
            
                <a href="../Vue/">
            
                    
                        <b>1.6.</b>
                    
                    Vue知识点
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../Vue/Proxy 基本使用与defineProperty.html">
            
                <a href="../Vue/Proxy 基本使用与defineProperty.html">
            
                    
                        <b>1.6.1.</b>
                    
                    Proxy 基本使用与defineProperty
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../Vue/面试题串讲_vue.html">
            
                <a href="../Vue/面试题串讲_vue.html">
            
                    
                        <b>1.6.2.</b>
                    
                    面试题串讲_vue
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../React/">
            
                <a href="../React/">
            
                    
                        <b>1.7.</b>
                    
                    React知识点
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../React/setState解析.html">
            
                <a href="../React/setState解析.html">
            
                    
                        <b>1.7.1.</b>
                    
                    setState解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../React/Fetch异步中止.html">
            
                <a href="../React/Fetch异步中止.html">
            
                    
                        <b>1.7.2.</b>
                    
                    Fetch异步中止
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../React/面试题串讲_react.html">
            
                <a href="../React/面试题串讲_react.html">
            
                    
                        <b>1.7.3.</b>
                    
                    面试题串讲_react
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../ReactNative/">
            
                <a href="../ReactNative/">
            
                    
                        <b>1.8.</b>
                    
                    ReactNative
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../ReactNative/RN分包机制.html">
            
                <a href="../ReactNative/RN分包机制.html">
            
                    
                        <b>1.8.1.</b>
                    
                    RN分包机制
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >链表原来如此简单</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x94FE;&#x8868;&#x539F;&#x6765;&#x5982;&#x6B64;&#x7B80;&#x5355;">&#x94FE;&#x8868;&#x539F;&#x6765;&#x5982;&#x6B64;&#x7B80;&#x5355;</h1>
<h3 id="&#x5F15;&#x8A00;">&#x5F15;&#x8A00;</h3>
<p>&#x94FE;&#x8868;&#x76F8;&#x5BF9;&#x4E8E;&#x6570;&#x7EC4;&#x6765;&#x8BF4;&#xFF0C;&#x8981;&#x590D;&#x6742;&#x7684;&#x591A;&#xFF0C;&#x9996;&#x5148;&#xFF0C;==&#x94FE;&#x8868;&#x4E0D;&#x9700;&#x8981;&#x8FDE;&#x7EED;&#x7684;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#xFF0C;&#x5B83;&#x662F;&#x7531;&#x4E00;&#x7EC4;&#x96F6;&#x6563;&#x7684;&#x5185;&#x5B58;&#x5757;&#x900F;&#x8FC7;&#x6307;&#x9488;&#x8FDE;&#x63A5;&#x800C;&#x6210;==&#xFF0C;&#x6240;&#x4EE5;&#xFF0C;&#x6BCF;&#x4E00;&#x4E2A;&#x5757;&#x4E2D;&#x5FC5;&#x987B;<code>&#x5305;&#x542B;&#x5F53;&#x524D;&#x8282;&#x70B9;&#x5185;&#x5BB9;&#x4EE5;&#x53CA;&#x540E;&#x7EE7;&#x6307;&#x9488;</code>&#x3002;&#x6700;&#x5E38;&#x89C1;&#x7684;&#x94FE;&#x8868;&#x7C7B;&#x578B;&#x6709;&#x5355;&#x94FE;&#x8868;&#x3001;&#x53CC;&#x94FE;&#x8868;&#x4EE5;&#x53CA;&#x5FAA;&#x73AF;&#x94FE;&#x8868;&#x3002;</p>
<p>&#x5B66;&#x4E60;&#x94FE;&#x8868;&#x6700;&#x91CD;&#x8981;&#x7684;&#x662F; <strong>&#x591A;&#x753B;&#x56FE;&#x591A;&#x7EC3;&#x4E60;</strong> &#xFF0C;&#x6CA1;&#x6709;&#x6377;&#x5F84;&#x53EF;&#x5FAA;&#xFF0C;&#x5728;&#x9047;&#x5230;&#x94FE;&#x8868;&#x95EE;&#x9898;&#x65F6;&#xFF0C;&#x74F6;&#x5B50;&#x541B;&#x603B;&#x7ED3;&#x4E86;&#x4E00;&#x4E0B;&#xFF0C;&#x53EF;&#x4EE5;&#x6309;&#x7167;&#x4EE5;&#x4E0B;&#x4E94;&#x6B65;&#x9AA4;&#xFF1A;</p>
<ul>
<li>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF1A;&#x5355;&#x94FE;&#x8868;&#x3001;&#x53CC;&#x94FE;&#x8868;&#x6216;&#x5FAA;&#x73AF;&#x94FE;&#x8868;&#x7B49;</li>
<li>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x601D;&#x8DEF;&#xFF1A;&#x5982;&#x4F55;&#x89E3;&#x51B3;&#x95EE;&#x9898;</li>
<li>&#x753B;&#x56FE;&#x5B9E;&#x73B0;&#xFF1A;&#x753B;&#x56FE;&#x53EF;&#x4EE5;&#x5E2E;&#x52A9;&#x6211;&#x4EEC;&#x53D1;&#x73B0;&#x601D;&#x7EF4;&#x4E2D;&#x7684;&#x6F0F;&#x6D1E;&#xFF08;&#x4E00;&#x4E9B;&#x601D;&#x8DEF;&#x4E0D;&#x5468;&#x7684;&#x60C5;&#x51B5;&#xFF09;</li>
<li>&#x786E;&#x5B9A;&#x8FB9;&#x754C;&#x6761;&#x4EF6;&#xFF1A;&#x601D;&#x8003;&#x89E3;&#x9898;&#x4E2D;&#x662F;&#x5426;&#x6709;&#x8FB9;&#x754C;&#x95EE;&#x9898;&#x4EE5;&#x53CA;&#x5982;&#x4F55;&#x89E3;&#x51B3;</li>
<li>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF1A;&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</li>
</ul>
<p>&#x672C;&#x6587;&#x4F1A;&#x7ED9;&#x5E38;&#x7528;&#x94FE;&#x8868;&#xFF08;&#x5355;&#x94FE;&#x8868;&#x3001;&#x53CC;&#x94FE;&#x8868;&#x4EE5;&#x53CA;&#x5FAA;&#x73AF;&#x94FE;&#x8868;&#xFF09;&#x7684;&#x57FA;&#x672C;&#x64CD;&#x4F5C;&#x5DF2;&#x7ECF;&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF0C;&#x5E76;&#x7ED9;&#x51FA;&#x5B9E;&#x73B0;&#x601D;&#x8DEF;&#xFF0C;&#x8FD9;&#x4E9B;&#x90FD;&#x662F;&#x94FE;&#x8868;&#x89E3;&#x9898;&#x7684;&#x57FA;&#x77F3;&#xFF0C;&#x8BF7;&#x52A1;&#x5FC5;&#x638C;&#x63E1;&#xFF01;&#x26FD;&#xFE0F;&#x26FD;&#xFE0F;&#x26FD;&#xFE0F;</p>
<p>&#x6700;&#x540E;&#x9644;&#x8D60;&#x4E00;&#x9053; leetcode &#x9898;&#x76EE;&#xFF0C;&#x5E76;&#x6309;&#x7167;&#x94FE;&#x8868;&#x89E3;&#x9898;&#x4E94;&#x6B65;&#x9AA4;&#x7ED9;&#x51FA;&#x7B54;&#x6848;&#xFF01;</p>
<p>&#x4E0B;&#x9762;&#x5F00;&#x59CB;&#x672C;&#x8282;&#x7684;&#x5B66;&#x4E60;&#x5427;&#xFF01;&#xFF01;&#xFF01;&#x1F447;&#x1F447;&#x1F447;</p>
<h3 id="&#x4E00;&#x3001;&#x5355;&#x94FE;&#x8868;">&#x4E00;&#x3001;&#x5355;&#x94FE;&#x8868;</h3>
<p><a href="https://camo.githubusercontent.com/1ff6e05c5a770474c4e98705cabd818da222f9dd/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f706e672f3237333530362f313538343138393434353333342d64363537623037372d373262332d346439352d386164622d6439313862363534333535372e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f706e672f3237333530362f313538343138393434353333342d64363537623037372d373262332d346439352d386164622d6439313862363534333535372e706e67.png" alt="img"></a></p>
<p>&#x5355;&#x94FE;&#x8868;&#x7ED3;&#x6784;&#xFF1A;</p>
<pre class="language-"><code class="lang-js"><span class="token keyword">function</span> <span class="token function">List</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token comment">// &#x8282;&#x70B9;</span>
  <span class="token keyword">let</span> <span class="token function-variable function">Node</span> <span class="token operator">=</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">element</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>element <span class="token operator">=</span> element
    <span class="token keyword">this</span><span class="token punctuation">.</span>next <span class="token operator">=</span> <span class="token keyword">null</span>
  <span class="token punctuation">}</span>
  <span class="token comment">// &#x521D;&#x59CB;&#x5934;&#x8282;&#x70B9;&#x4E3A; null</span>
  <span class="token keyword">let</span> head <span class="token operator">=</span> <span class="token keyword">null</span>

  <span class="token comment">// &#x94FE;&#x8868;&#x957F;&#x5EA6;</span>
  <span class="token keyword">let</span> length <span class="token operator">=</span> <span class="token number">0</span>
  <span class="token comment">// &#x64CD;&#x4F5C;</span>
  <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function-variable function">getList</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token keyword">return</span> head<span class="token punctuation">}</span>
  <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function-variable function">search</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">list<span class="token punctuation">,</span> element</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function-variable function">append</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">element</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function-variable function">insert</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">position<span class="token punctuation">,</span> element</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function-variable function">remove</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token parameter">element</span><span class="token punctuation">)</span><span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function-variable function">isEmpty</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function-variable function">size</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span><span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre>
<h4 id="1-&#x8FFD;&#x52A0;&#x8282;&#x70B9;&#xFF1A;">1. &#x8FFD;&#x52A0;&#x8282;&#x70B9;&#xFF1A;</h4>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF1A;</strong>&#x5355;&#x94FE;&#x8868;</p>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x601D;&#x8DEF;&#xFF1A;</strong> &#x521D;&#x59CB;&#x5316;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#xFF08;&#x5F85;&#x8FFD;&#x52A0;&#x8282;&#x70B9;&#xFF09;&#xFF0C;&#x904D;&#x5386;&#x5230;&#x94FE;&#x5C3E;&#xFF0C;&#x5728;&#x5C3E;&#x8282;&#x70B9;&#x540E;&#x63D2;&#x5165;&#x8BE5;&#x8282;&#x70B9;</p>
<p><strong>&#x753B;&#x56FE;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<p><a href="https://camo.githubusercontent.com/8e352bf039eb370e678825fc69862c48e5b09783/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303430333233303433352e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303430333233303433352e706e67.png" alt="img"></a></p>
<p><strong>&#x786E;&#x5B9A;&#x8FB9;&#x754C;&#x6761;&#x4EF6;&#xFF1A;</strong> &#x5F53;&#x94FE;&#x8868;&#x4E3A; <code>null</code> &#xFF0C;&#x76F4;&#x63A5;&#x5C06; <code>head</code> &#x6307;&#x5411;&#x5F85;&#x63D2;&#x5165;&#x8282;&#x70B9;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x904D;&#x5386;</p>
<p><strong>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<pre class="language-"><code class="lang-js"><span class="token keyword">function</span> <span class="token function">append</span> <span class="token punctuation">(</span><span class="token parameter">element</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token keyword">let</span> node <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Node</span><span class="token punctuation">(</span>element<span class="token punctuation">)</span><span class="token punctuation">,</span>
      p <span class="token operator">=</span> head
  <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span>head<span class="token punctuation">)</span><span class="token punctuation">{</span>
    head <span class="token operator">=</span> node
  <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
    <span class="token keyword">while</span> <span class="token punctuation">(</span>p<span class="token punctuation">.</span>next<span class="token punctuation">)</span> <span class="token punctuation">{</span>
      p <span class="token operator">=</span> p<span class="token punctuation">.</span>next
    <span class="token punctuation">}</span>
    p<span class="token punctuation">.</span>next <span class="token operator">=</span> node
  <span class="token punctuation">}</span>
  length <span class="token operator">+=</span> <span class="token number">1</span>
<span class="token punctuation">}</span>

<span class="token comment">// &#x6D4B;&#x8BD5;</span>
<span class="token keyword">let</span> list <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">List</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token keyword">for</span><span class="token punctuation">(</span><span class="token keyword">let</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> <span class="token number">5</span><span class="token punctuation">;</span> i<span class="token operator">+=</span><span class="token number">1</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  list<span class="token punctuation">.</span><span class="token function">append</span><span class="token punctuation">(</span>i<span class="token punctuation">)</span>
<span class="token punctuation">}</span>
</code></pre>
<p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="2-&#x67E5;&#x627E;&#xFF1A;">2. &#x67E5;&#x627E;&#xFF1A;</h4>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF1A;</strong>&#x5355;&#x94FE;&#x8868;</p>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x601D;&#x8DEF;&#xFF1A;</strong> &#x904D;&#x5386;&#x5355;&#x94FE;&#x8868;&#xFF0C;&#x5224;&#x65AD;&#x8282;&#x70B9;&#x503C;&#x662F;&#x5426;&#x7B49;&#x4E8E;&#x5F85;&#x67E5;&#x627E;&#x503C;&#xFF0C;&#x76F8;&#x7B49;&#x5219;&#x8FD4;&#x56DE; <code>true</code> &#xFF0C;&#x5426;&#x5219;&#x7EE7;&#x7EED;&#x904D;&#x5386;&#x4E0B;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#xFF0C;&#x76F4;&#x5230;&#x904D;&#x5386;&#x5B8C;&#x6574;&#x4E2A;&#x94FE;&#x8868;&#x8FD8;&#x672A;&#x627E;&#x5230;&#xFF0C;&#x5219;&#x8FD4;&#x56DE; <code>false</code></p>
<p><strong>&#x753B;&#x56FE;&#x5B9E;&#x73B0;&#xFF1A;</strong> &#x5F88;&#x7B80;&#x5355;&#xFF0C;&#x8BFB;&#x8005;&#x53EF;&#x4EE5;&#x5C1D;&#x8BD5;&#x753B;&#x4E00;&#x4E0B;</p>
<p><strong>&#x786E;&#x5B9A;&#x8FB9;&#x754C;&#x6761;&#x4EF6;&#xFF1A;</strong> &#x5F53;&#x94FE;&#x8868;&#x4E3A; <code>null</code> &#xFF0C;&#x53EF;&#x76F4;&#x63A5;&#x8FD4;&#x56DE; <code>false</code></p>
<p><strong>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<pre class="language-"><code>// &#x5224;&#x65AD;&#x94FE;&#x8868;&#x4E2D;&#x662F;&#x5426;&#x5B58;&#x5728;&#x67D0;&#x8282;&#x70B9;
function search(element) {
  let p = head
  if (!p) return false
  while(p) {
    if (p.element === element) return true
    p = p.next
  }
  return false
}

// &#x6D4B;&#x8BD5;
list.search(4) // true
list.search(11) // false
</code></pre><p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="3-&#x5728;-position-&#x4F4D;&#x7F6E;&#x63D2;&#x5165;&#xFF1A;">3. &#x5728; position &#x4F4D;&#x7F6E;&#x63D2;&#x5165;&#xFF1A;</h4>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF1A;</strong>&#x5355;&#x94FE;&#x8868;</p>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x601D;&#x8DEF;&#xFF1A;</strong> &#x521D;&#x59CB;&#x5316;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#xFF08;&#x5F85;&#x63D2;&#x5165;&#x8282;&#x70B9; <code>node</code> &#xFF09;&#xFF0C;&#x904D;&#x5386;&#x5230; <code>position</code> &#x524D;&#x4E00;&#x4E2A;&#x4F4D;&#x7F6E;&#x8282;&#x70B9;&#xFF0C;&#x5728;&#x8BE5;&#x8282;&#x70B9;&#x540E;&#x63D2;&#x5165; <code>node</code></p>
<p><strong>&#x753B;&#x56FE;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<p><a href="https://camo.githubusercontent.com/2f1963c7caf1133c175baf6bb039a69e9c7d0ea8/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f706e672f3237333530362f313538343139333237313434302d31616161346664392d656335632d346139632d396366382d6533353763623531383166392e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f706e672f3237333530362f313538343139333237313434302d31616161346664392d656335632d346139632d396366382d6533353763623531383166392e706e67.png" alt="img"></a></p>
<p><strong>&#x786E;&#x5B9A;&#x8FB9;&#x754C;&#x6761;&#x4EF6;&#xFF1A;</strong></p>
<ul>
<li>&#x5F53; <code>position</code> &#x4E3A; <code>0</code> &#x65F6;&#xFF0C;&#x76F4;&#x63A5;&#x5C06;&#x63D2;&#x5165;&#x8282;&#x70B9; <code>node.next</code> &#x6307;&#x5411; <code>head</code> &#xFF0C; <code>head</code> &#x6307;&#x5411; <code>node</code> &#x5373;&#x53EF;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x904D;&#x5386;</li>
<li>&#x5F53;&#x5F85;&#x63D2;&#x5165;&#x4F4D;&#x7F6E; <code>position &lt; 0</code> &#x6216;&#x8D85;&#x51FA;&#x94FE;&#x8868;&#x957F;&#x5EA6; <code>position &gt; length</code> &#xFF0C;&#x90FD;&#x662F;&#x6709;&#x95EE;&#x9898;&#x7684;&#xFF0C;&#x4E0D;&#x53EF;&#x63D2;&#x5165;&#xFF0C;&#x6B64;&#x65F6;&#x76F4;&#x63A5;&#x8FD4;&#x56DE; <code>null</code> &#xFF0C;&#x63D2;&#x5165;&#x5931;&#x8D25;</li>
</ul>
<p><strong>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<pre class="language-"><code class="lang-js"><span class="token comment">// &#x63D2;&#x5165; position &#x7684;&#x540E;&#x7EE7;&#x8282;&#x70B9;</span>
<span class="token keyword">function</span> <span class="token function">insert</span> <span class="token punctuation">(</span><span class="token parameter">position<span class="token punctuation">,</span> element</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token comment">// &#x521B;&#x5EFA;&#x63D2;&#x5165;&#x8282;&#x70B9;</span>
  <span class="token keyword">let</span> node <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">createNode</span><span class="token punctuation">(</span>element<span class="token punctuation">)</span>
  <span class="token comment">//&#x8FB9;&#x754C;&#x6761;&#x4EF6;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>position <span class="token operator">&gt;=</span> <span class="token number">0</span> <span class="token operator">&amp;&amp;</span> position <span class="token operator">&lt;=</span> length<span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">let</span> prev <span class="token operator">=</span> head<span class="token punctuation">,</span> 
        curr <span class="token operator">=</span> head<span class="token punctuation">,</span>
        index <span class="token operator">=</span> <span class="token number">0</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span>position <span class="token operator">===</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      node<span class="token punctuation">.</span>next <span class="token operator">=</span> head
      head <span class="token operator">=</span> node
    <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
      <span class="token keyword">while</span><span class="token punctuation">(</span>index <span class="token operator">&lt;</span> position<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        prev <span class="token operator">=</span> curr
        curr <span class="token operator">=</span> curr<span class="token punctuation">.</span>next
        index <span class="token operator">++</span>
      <span class="token punctuation">}</span>
      prev<span class="token punctuation">.</span>next <span class="token operator">=</span> node
      node<span class="token punctuation">.</span>next <span class="token operator">=</span> curr
    <span class="token punctuation">}</span>
    length <span class="token operator">+=</span> <span class="token number">1</span>
  <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token keyword">null</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>

<span class="token comment">// &#x6D4B;&#x8BD5;</span>
list<span class="token punctuation">.</span><span class="token function">insert</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
</code></pre>
<p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="4-&#x5220;&#x9664;&#xFF1A;">4. &#x5220;&#x9664;&#xFF1A;</h4>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF1A;</strong>&#x5355;&#x94FE;&#x8868;</p>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x601D;&#x8DEF;&#xFF1A;</strong> &#x904D;&#x5386;&#x5355;&#x94FE;&#x8868;&#xFF0C;&#x627E;&#x5230;&#x5F85;&#x5220;&#x9664;&#x8282;&#x70B9;&#xFF0C;&#x5220;&#x9664;</p>
<p><strong>&#x753B;&#x56FE;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<p><a href="https://camo.githubusercontent.com/045fd7b00afdbd4366fd7a8dd27ac17d82cbf9a5/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f706e672f3237333530362f313538343139333430333733382d39626361366631312d626365632d343033612d626639362d3732323064343131353436302e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f706e672f3237333530362f313538343139333430333733382d39626361366631312d626365632d343033612d626639362d3732323064343131353436302e706e67.png" alt="img"></a></p>
<p><strong>&#x786E;&#x5B9A;&#x8FB9;&#x754C;&#x6761;&#x4EF6;&#xFF1A;</strong> &#x5F53;&#x94FE;&#x8868;&#x4E3A; <code>null</code> &#xFF0C;&#x76F4;&#x63A5;&#x8FD4;&#x56DE;</p>
<p><strong>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<pre class="language-"><code>// &#x5220;&#x9664;&#x503C;&#x4E3A; element &#x8282;&#x70B9;
function remove (element) {
  let p = head, prev = head
  if(!head) return
  while(p) {
    if(p.element === element) {
      p = p.next
      prev.next = p
    } else {
        prev = p
        p = p.next  
    }
  }
}
</code></pre><p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="5-&#x590D;&#x6742;&#x5EA6;&#x5206;&#x6790;&#xFF1A;">5. &#x590D;&#x6742;&#x5EA6;&#x5206;&#x6790;&#xFF1A;</h4>
<p><strong>&#x67E5;&#x627E;&#xFF1A;&#x4ECE;&#x5934;&#x8282;&#x70B9;&#x5F00;&#x59CB;&#x67E5;&#x627E;&#xFF0C;&#x65F6;&#x95F4;&#x590D;&#x6742;&#x5EA6;&#x4E3A; O(n)</strong></p>
<p><strong>&#x63D2;&#x5165;&#x6216;&#x5220;&#x9664;&#xFF1A;&#x5728;&#x67D0;&#x4E00;&#x8282;&#x70B9;&#x540E;&#x63D2;&#x5165;&#x6216;&#x5220;&#x9664;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#xFF08;&#x540E;&#x7EE7;&#x8282;&#x70B9;&#xFF09;&#x7684;&#x65F6;&#x95F4;&#x590D;&#x6742;&#x5EA6;&#x4E3A; O(1)</strong></p>
<p>&#x94FE;&#x8868;&#x4E94;&#x6B65;&#x9AA4;&#x662F;&#x4E0D;&#x662F;&#x5F88;&#x597D;&#x7528;&#x1F60A;&#xFF0C;&#x4E0B;&#x9762;&#x770B;&#x4E00;&#x4E0B;&#x53CC;&#x94FE;&#x8868;&#x1F447;</p>
<h3 id="&#x4E8C;&#x3001;&#x53CC;&#x94FE;&#x8868;">&#x4E8C;&#x3001;&#x53CC;&#x94FE;&#x8868;</h3>
<p>&#x987E;&#x540D;&#x601D;&#x4E49;&#xFF0C;&#x5355;&#x94FE;&#x8868;&#x53EA;&#x6709;&#x4E00;&#x4E2A;&#x65B9;&#x5411;&#xFF0C;&#x4ECE;&#x5934;&#x8282;&#x70B9;&#x5230;&#x5C3E;&#x8282;&#x70B9;&#xFF0C;&#x90A3;&#x4E48;&#x53CC;&#x94FE;&#x8868;&#x5C31;&#x6709;&#x4E24;&#x4E2A;&#x65B9;&#x5411;&#xFF0C;&#x4ECE;&#x5C3E;&#x8282;&#x70B9;&#x5230;&#x5934;&#x8282;&#x70B9;&#xFF1A;</p>
<p><a href="https://camo.githubusercontent.com/3141298bf41dc4da5aeff6e62b0dc722281ea54f/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303332363233303934372e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303332363233303934372e706e67.png" alt="img"></a></p>
<pre class="language-"><code>function DoublyLinkedList() {
    let Node = function(element) {
        this.element = element
        // &#x524D;&#x9A71;&#x6307;&#x9488;
        this.prev = null
        // &#x540E;&#x7EE7;&#x6307;&#x9488;
        this.next = null
    }
    // &#x521D;&#x59CB;&#x5934;&#x8282;&#x70B9;&#x4E3A; null
      let head = null
    // &#x65B0;&#x589E;&#x5C3E;&#x8282;&#x70B9;
    let tail = null

      // &#x94FE;&#x8868;&#x957F;&#x5EA6;
      let length = 0
    // &#x64CD;&#x4F5C;
    this.search = function(element) {}
    this.insert = function(position, element) {}
    this.removeAt = function(position){}
    this.isEmpty = function(){ return length === 0 } 
    this.size = function(){ return length }
}
</code></pre><h4 id="1-&#x5728;-position-&#x4F4D;&#x7F6E;&#x63D2;&#x5165;&#x8282;&#x70B9;&#xFF1A;">1. &#x5728; position &#x4F4D;&#x7F6E;&#x63D2;&#x5165;&#x8282;&#x70B9;&#xFF1A;</h4>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF1A;</strong> &#x53CC;&#x94FE;&#x8868;</p>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x601D;&#x8DEF;&#xFF1A;</strong> &#x521D;&#x59CB;&#x5316;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#xFF08;&#x5F85;&#x63D2;&#x5165;&#x8282;&#x70B9; <code>node</code> &#xFF09;&#xFF0C;&#x904D;&#x5386;&#x94FE;&#x8868;&#x5230; <code>position</code> &#x524D;&#x4E00;&#x4E2A;&#x4F4D;&#x7F6E;&#x8282;&#x70B9;&#xFF0C;&#x5728;&#x8BE5;&#x8282;&#x70B9;&#x4F4D;&#x7F6E;&#x540E;&#x63D2;&#x5165; <code>node</code></p>
<p><strong>&#x753B;&#x56FE;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<p><a href="https://camo.githubusercontent.com/fc246f31367aa80919412ceecd3fc7d46a33a1ae/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303430333233313332312e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303430333233313332312e706e67.png" alt="img"></a></p>
<p><strong>&#x786E;&#x5B9A;&#x8FB9;&#x754C;&#x6761;&#x4EF6;&#xFF1A;</strong></p>
<p>&#x5F53;&#x5F85;&#x63D2;&#x5165;&#x4F4D;&#x7F6E; <code>position &lt; 0</code> &#x6216;&#x8D85;&#x51FA;&#x94FE;&#x8868;&#x957F;&#x5EA6; <code>position &gt; length</code> &#xFF0C;&#x90FD;&#x662F;&#x6709;&#x95EE;&#x9898;&#x7684;&#xFF0C;&#x4E0D;&#x53EF;&#x63D2;&#x5165;&#xFF0C;&#x6B64;&#x65F6;&#x76F4;&#x63A5;&#x8FD4;&#x56DE; <code>null</code> &#xFF0C;&#x63D2;&#x5165;&#x5931;&#x8D25;</p>
<p><strong>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<pre class="language-"><code class="lang-js"><span class="token comment">// &#x63D2;&#x5165; position &#x7684;&#x540E;&#x7EE7;&#x8282;&#x70B9;</span>
<span class="token keyword">function</span> <span class="token function">insert</span> <span class="token punctuation">(</span><span class="token parameter">position<span class="token punctuation">,</span> element</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token comment">// &#x521B;&#x5EFA;&#x63D2;&#x5165;&#x8282;&#x70B9;</span>
  <span class="token keyword">let</span> node <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Node</span><span class="token punctuation">(</span>element<span class="token punctuation">)</span>
  <span class="token comment">//&#x8FB9;&#x754C;&#x6761;&#x4EF6;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>position <span class="token operator">&gt;=</span> <span class="token number">0</span> <span class="token operator">&amp;&amp;</span> position <span class="token operator">&lt;</span> length<span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">let</span> prev <span class="token operator">=</span> head<span class="token punctuation">,</span> 
        curr <span class="token operator">=</span> head<span class="token punctuation">,</span>
        index <span class="token operator">=</span> <span class="token number">0</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span>position <span class="token operator">===</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token comment">// &#x5728;&#x7B2C;&#x4E00;&#x4E2A;&#x4F4D;&#x7F6E;&#x6DFB;&#x52A0;</span>
        <span class="token keyword">if</span><span class="token punctuation">(</span><span class="token operator">!</span>head<span class="token punctuation">)</span> <span class="token punctuation">{</span> <span class="token comment">// &#x6CE8;&#x610F;&#x8FD9;&#x91CC;&#x4E0E;&#x5355;&#x94FE;&#x8868;&#x4E0D;&#x540C;</span>
          head <span class="token operator">=</span> node
          tail <span class="token operator">=</span> node
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
          <span class="token comment">// &#x53CC;&#x5411;</span>
          node<span class="token punctuation">.</span>next <span class="token operator">=</span> head
          head<span class="token punctuation">.</span>prev <span class="token operator">=</span> node
          <span class="token comment">// head &#x6307;&#x5411;&#x65B0;&#x7684;&#x5934;&#x8282;&#x70B9;</span>
          head <span class="token operator">=</span> node
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token keyword">if</span><span class="token punctuation">(</span>position <span class="token operator">===</span> length<span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token comment">// &#x63D2;&#x5165;&#x5230;&#x5C3E;&#x8282;&#x70B9;</span>
      curr <span class="token operator">=</span> tial
      curr<span class="token punctuation">.</span>next <span class="token operator">=</span> node
      node<span class="token punctuation">.</span>prev <span class="token operator">=</span> curr
      <span class="token comment">// tail &#x6307;&#x5411;&#x65B0;&#x7684;&#x5C3E;&#x8282;&#x70B9;</span>
      tail <span class="token operator">=</span> node
    <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
      <span class="token keyword">while</span><span class="token punctuation">(</span>index <span class="token operator">&lt;</span> position<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        prev <span class="token operator">=</span> curr
        curr <span class="token operator">=</span> curr<span class="token punctuation">.</span>next
        index <span class="token operator">++</span>
      <span class="token punctuation">}</span>
      <span class="token comment">// &#x63D2;&#x5165;&#x5230; prev &#x540E;&#xFF0C;curr &#x524D;</span>
      prev<span class="token punctuation">.</span>next <span class="token operator">=</span> node
      node<span class="token punctuation">.</span>next <span class="token operator">=</span> curr
      curr<span class="token punctuation">.</span>prev <span class="token operator">=</span> node
      node<span class="token punctuation">.</span>prev <span class="token operator">=</span> prev
    <span class="token punctuation">}</span>
    length <span class="token operator">+=</span> <span class="token number">1</span>
    <span class="token keyword">return</span> <span class="token boolean">true</span>
  <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token boolean">false</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>

<span class="token comment">// &#x6D4B;&#x8BD5;</span>
list<span class="token punctuation">.</span><span class="token function">insert</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
</code></pre>
<p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="2-&#x5220;&#x9664;&#xFF1A;">2. &#x5220;&#x9664;&#xFF1A;</h4>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF1A;</strong> &#x53CC;&#x94FE;&#x8868;</p>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x601D;&#x8DEF;&#xFF1A;</strong> &#x904D;&#x5386;&#x53CC;&#x94FE;&#x8868;&#xFF0C;&#x627E;&#x5230;&#x5F85;&#x5220;&#x9664;&#x8282;&#x70B9;&#xFF0C;&#x5220;&#x9664;</p>
<p><strong>&#x753B;&#x56FE;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<p><a href="https://camo.githubusercontent.com/971a58859a67bb3fc769a7d8637747da56283a4c/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303430333233323030322e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303430333233323030322e706e67.png" alt="img"></a></p>
<p><strong>&#x786E;&#x5B9A;&#x8FB9;&#x754C;&#x6761;&#x4EF6;&#xFF1A;</strong> &#x5F53;&#x94FE;&#x8868;&#x4E3A; <code>null</code> &#xFF0C;&#x76F4;&#x63A5;&#x8FD4;&#x56DE;</p>
<p><strong>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<pre class="language-"><code>// &#x5220;&#x9664; position &#x4F4D;&#x7F6E;&#x7684;&#x8282;&#x70B9;
function removeAt (position) {
  if (position &gt;= 0 &amp;&amp; position &lt; length &amp;&amp; length &gt; 0) {
    let prev = head, 
        curr = head,
        index = 0
    if(position === 0) {
      // &#x79FB;&#x9664;&#x5934;&#x8282;&#x70B9;
        if(length === 1) { // &#x4EC5;&#x6709;&#x4E00;&#x4E2A;&#x8282;&#x70B9;
          head = null
          tail = null
        } else {
          head = head.next
          head.prev = null
        }
    } else if(position === length-1) {
      // &#x79FB;&#x9664;&#x5C3E;&#x8282;&#x70B9;
      curr = tial
      tail = curr.prev
      tail.next = null
    } else {
      while(index &lt; position) {
        prev = curr
        curr = curr.next
        index ++
      }
      // &#x79FB;&#x9664;curr
      prev.next = curr.next
      curr.next.prev = prev
    }
    length -= 1
    return curr.element
  } else {
    return null
  }
}
</code></pre><p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="3-&#x67E5;&#x627E;&#xFF1A;">3. &#x67E5;&#x627E;&#xFF1A;</h4>
<p>&#x53CC;&#x94FE;&#x8868;&#x7684;&#x67E5;&#x627E;&#x548C;&#x5355;&#x94FE;&#x8868;&#x7C7B;&#x4F3C;&#xFF0C;&#x90FD;&#x662F;&#x904D;&#x5386;&#x94FE;&#x8868;&#xFF0C;&#x627E;&#x5230;&#x8FD4;&#x56DE; <code>true</code>&#xFF0C;&#x627E;&#x4E0D;&#x5230;&#x8FD4;&#x56DE; <code>false</code> &#x3002;</p>
<h4 id="4-&#x590D;&#x6742;&#x5EA6;&#x5206;&#x6790;&#xFF1A;">4. &#x590D;&#x6742;&#x5EA6;&#x5206;&#x6790;&#xFF1A;</h4>
<p><strong>&#x67E5;&#x627E;&#xFF1A;&#x67E5;&#x627E;&#x524D;&#x9A71;&#x8282;&#x70B9;&#x6216;&#x540E;&#x7EE7;&#x8282;&#x70B9;&#x65F6;&#x95F4;&#x590D;&#x6742;&#x5EA6;&#x4E3A; O(1)&#xFF0C;&#x5176;&#x5B83;&#x8282;&#x70B9;&#x4ECD;&#x4E3A; O(n)</strong></p>
<p><strong>&#x63D2;&#x5165;&#x6216;&#x5220;&#x9664;&#xFF1A;&#x63D2;&#x5165;&#x6216;&#x5220;&#x9664;&#x524D;&#x9A71;&#x8282;&#x70B9;&#x6216;&#x540E;&#x7EE7;&#x8282;&#x70B9;&#x7684;&#x65F6;&#x95F4;&#x590D;&#x6742;&#x5EA6;&#x90FD;&#x4E3A; O(1)</strong></p>
<h3 id="&#x4E09;&#x3001;&#x5FAA;&#x73AF;&#x5355;&#x94FE;&#x8868;">&#x4E09;&#x3001;&#x5FAA;&#x73AF;&#x5355;&#x94FE;&#x8868;</h3>
<p>&#x5FAA;&#x73AF;&#x5355;&#x94FE;&#x8868;&#x662F;&#x4E00;&#x79CD;&#x7279;&#x6B8A;&#x7684;&#x5355;&#x94FE;&#x8868;&#xFF0C;&#x5B83;&#x548C;&#x5355;&#x94FE;&#x8868;&#x7684;&#x552F;&#x4E00;&#x533A;&#x522B;&#x662F;&#xFF1A;&#x5355;&#x94FE;&#x8868;&#x7684;&#x5C3E;&#x8282;&#x70B9;&#x6307;&#x5411;&#x7684;&#x662F; NULL&#xFF0C;&#x800C;&#x5FAA;&#x73AF;&#x5355;&#x94FE;&#x8868;&#x7684;&#x5C3E;&#x8282;&#x70B9;&#x6307;&#x5411;&#x7684;&#x662F;&#x5934;&#x8282;&#x70B9;&#xFF0C;&#x8FD9;&#x5C31;&#x5F62;&#x6210;&#x4E86;&#x4E00;&#x4E2A;&#x9996;&#x5C3E;&#x76F8;&#x8FDE;&#x7684;&#x73AF;&#xFF1A;</p>
<p><a href="https://camo.githubusercontent.com/c44b1fda0edbd1e1ad68652afe58b42abe277dc0/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f706e672f3237333530362f313538343139343133323631352d30333861333633632d326338362d343463382d623539612d3133336464353166656337322e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f706e672f3237333530362f313538343139343133323631352d30333861333633632d326338362d343463382d623539612d3133336464353166656337322e706e67.png" alt="img"></a></p>
<p>&#x65E2;&#x7136;&#x6709;&#x5FAA;&#x73AF;&#x5355;&#x94FE;&#x8868;&#xFF0C;&#x5F53;&#x7136;&#x4E5F;&#x6709;&#x5FAA;&#x73AF;&#x53CC;&#x94FE;&#x8868;&#xFF0C;&#x5FAA;&#x73AF;&#x53CC;&#x94FE;&#x8868;&#x548C;&#x53CC;&#x94FE;&#x8868;&#x4E0D;&#x540C;&#x7684;&#x662F;&#xFF1A;</p>
<ul>
<li>&#x5FAA;&#x73AF;&#x53CC;&#x94FE;&#x8868;&#x7684; <code>tail.next</code>&#xFF08; <code>tail</code> &#x7684;&#x540E;&#x7EE7;&#x6307;&#x9488;&#xFF09; &#x4E3A; <code>null</code> &#xFF0C;&#x5FAA;&#x73AF;&#x53CC;&#x94FE;&#x8868;&#x7684; <code>tail.next</code> &#x4E3A; <code>head</code></li>
<li>&#x5FAA;&#x73AF;&#x53CC;&#x94FE;&#x8868;&#x7684; <code>head.prev</code>&#xFF08; <code>head</code> &#x7684;&#x524D;&#x9A71;&#x6307;&#x9488;&#xFF09; &#x4E3A; <code>null</code> &#xFF0C;&#x5FAA;&#x73AF;&#x53CC;&#x94FE;&#x8868;&#x7684; <code>head.prev</code> &#x4E3A; <code>tail</code></li>
</ul>
<p>&#x8FD9;&#x91CC;&#x4EE5;&#x5FAA;&#x73AF;&#x5355;&#x5217;&#x8868;&#x4E3A;&#x4F8B;</p>
<pre class="language-"><code>function CircularLinkedList() {
    let Node = function(element) {
        this.element = element
        // &#x540E;&#x7EE7;&#x6307;&#x9488;
        this.next = null
    }
    // &#x521D;&#x59CB;&#x5934;&#x8282;&#x70B9;&#x4E3A; null
      let head = null

      // &#x94FE;&#x8868;&#x957F;&#x5EA6;
      let length = 0
    // &#x64CD;&#x4F5C;
    this.search = function(element) {}
    this.insert = function(positon, element) {}
    this.removeAt = function(position){}
    this.isEmpty = function(){ return length === 0 } 
    this.size = function(){ return length }
}
</code></pre><h4 id="1-&#x5728;-positon-&#x540E;&#x63D2;&#x5165;&#xFF1A;">1. &#x5728; positon &#x540E;&#x63D2;&#x5165;&#xFF1A;</h4>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#xFF1A;</strong> &#x5FAA;&#x73AF;&#x5355;&#x94FE;&#x8868;</p>
<p><strong>&#x786E;&#x5B9A;&#x89E3;&#x9898;&#x601D;&#x8DEF;&#xFF1A;</strong> &#x521D;&#x59CB;&#x5316;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#xFF08;&#x5F85;&#x63D2;&#x5165;&#x8282;&#x70B9; <code>node</code> &#xFF09;&#xFF0C;&#x904D;&#x5386;&#x5230; <code>position</code> &#x524D;&#x4E00;&#x4E2A;&#x4F4D;&#x7F6E;&#x8282;&#x70B9;&#xFF0C;&#x5728;&#x8BE5;&#x8282;&#x70B9;&#x540E;&#x63D2;&#x5165; <code>node</code></p>
<p><strong>&#x753B;&#x56FE;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<p><a href="https://camo.githubusercontent.com/5c5bfecce13f1def52975f362f9a20b3fc090f95/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303430333233323735312e706e67" target="_blank"><img src="../Users/lovewcc/Documents/Gitbook/Algorithm/687474703a2f2f7265736f757263652e6d757969792e636e2f696d6167652f32303230303430333233323735312e706e67.png" alt="img"></a></p>
<p><strong>&#x786E;&#x5B9A;&#x8FB9;&#x754C;&#x6761;&#x4EF6;&#xFF1A;</strong></p>
<ul>
<li>&#x5F53; <code>position</code> &#x4E3A; <code>0</code> &#x65F6;&#xFF0C;&#x9700;&#x8981;&#x904D;&#x5386;&#x5230;&#x5C3E;&#x8282;&#x70B9;&#xFF0C;&#x7136;&#x540E;&#x5728;&#x5C3E;&#x8282;&#x70B9;&#x540E;&#x63D2;&#x5165;&#x8282;&#x70B9; &#xFF0C; &#x5E76;&#x5C06; <code>head</code> &#x6307;&#x5411;</li>
<li>&#x5F53;&#x5F85;&#x63D2;&#x5165;&#x4F4D;&#x7F6E; <code>position &lt; 0</code> &#x6216;&#x8D85;&#x51FA;&#x94FE;&#x8868;&#x957F;&#x5EA6; <code>position &gt; length</code> &#xFF0C;&#x90FD;&#x662F;&#x6709;&#x95EE;&#x9898;&#x7684;&#xFF0C;&#x4E0D;&#x53EF;&#x63D2;&#x5165;&#xFF0C;&#x6B64;&#x65F6;&#x76F4;&#x63A5;&#x8FD4;&#x56DE; <code>null</code> &#xFF0C;&#x63D2;&#x5165;&#x5931;&#x8D25;</li>
</ul>
<p><strong>&#x4EE3;&#x7801;&#x5B9E;&#x73B0;&#xFF1A;</strong></p>
<pre class="language-"><code>// &#x63D2;&#x5165; position &#x7684;&#x540E;&#x7EE7;&#x8282;&#x70B9;
function insert (position, element) {
  // &#x521B;&#x5EFA;&#x63D2;&#x5165;&#x8282;&#x70B9;
  let node = new createNode(element)
  if (position &gt;= 0 &amp;&amp; position &lt;= length) {
    let prev = head, 
        curr = head,
        index = 0
    if(position === 0) {
      // &#x4E0E;&#x5355;&#x94FE;&#x8868;&#x63D2;&#x5165;&#x4E0D;&#x540C;&#x7684;
      while(index &lt; length) {
        prev = curr
        curr = curr.next
        index ++
      }
      prev.next = node
      node.next = curr
      head = node
    } else {
      while(index &lt; position) {
        prev = curr
        curr = curr.next
        index ++
      }
      prev.next = node
      node.next = curr
    }
    length += 1
  } else {
    return null
  }
}

// &#x6D4B;&#x8BD5;
list.insert(10)
</code></pre><p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="2-&#x67E5;&#x627E;&#xFF1A;">2. &#x67E5;&#x627E;&#xFF1A;</h4>
<p>&#x548C;&#x5355;&#x94FE;&#x8868;&#x7C7B;&#x4F3C;&#xFF0C;&#x552F;&#x4E00;&#x4E0D;&#x540C;&#x7684;&#x662F;&#xFF1A;&#x5FAA;&#x73AF;&#x5355;&#x94FE;&#x8868;&#x7684;&#x5FAA;&#x73AF;&#x7ED3;&#x675F;&#x6761;&#x4EF6;&#x4E3A; <code>index++ &lt; length</code></p>
<pre class="language-"><code>// &#x5224;&#x65AD;&#x94FE;&#x8868;&#x4E2D;&#x662F;&#x5426;&#x5B58;&#x5728;&#x67D0;&#x8282;&#x70B9;
function search(element) {
  if (!head) return false
  let p = head, index = 0
  // &#x548C;&#x5355;&#x94FE;&#x8868;&#x7684;&#x4E0D;&#x540C;&#x6240;&#x5728;
  while(index++ &lt; length) {
    if (p.element === element) return true
    p = p.next
  }
  return false
}

// &#x6D4B;&#x8BD5;
list.search(4) // true
list.search(11) // false
</code></pre><p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="3-&#x5220;&#x9664;&#xFF1A;">3. &#x5220;&#x9664;&#xFF1A;</h4>
<p>&#x548C;&#x5355;&#x94FE;&#x8868;&#x7C7B;&#x4F3C;&#xFF0C;&#x552F;&#x4E00;&#x4E0D;&#x540C;&#x7684;&#x662F;&#xFF1A;&#x5FAA;&#x73AF;&#x5355;&#x94FE;&#x8868;&#x7684;&#x5FAA;&#x73AF;&#x7ED3;&#x675F;&#x6761;&#x4EF6;&#x4E3A; <code>index++ &lt; length</code></p>
<pre class="language-"><code>// &#x5220;&#x9664;&#x503C;&#x4E3A; element &#x8282;&#x70B9;
function remove (element) {
  let p = head, prev = head, index = 0
  // &#x7A7A;&#x94FE;&#x8868;
  if(!head || ) return
  // &#x4EC5;&#x6709;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#x4E14;element&#x4E00;&#x81F4;
  if(length === 1 &amp;&amp; head.element === element){  
    head = null
    length-- 
    return  
  }
  while(index++ &lt; length) {
    if(p.element === element) {
      p = p.next
      prev.next = p
      length --
    } else {
        prev = p
        p = p.next  
    }
  }
}
</code></pre><p>&#x89E3;&#x9898;&#x5B8C;&#x6210;&#x2705;</p>
<h4 id="4-&#x590D;&#x6742;&#x5EA6;&#x5206;&#x6790;">4. &#x590D;&#x6742;&#x5EA6;&#x5206;&#x6790;</h4>
<p><strong>&#x67E5;&#x627E;&#xFF1A;&#x5FAA;&#x73AF;&#x94FE;&#x8868;&#x4ECE;&#x4EFB;&#x4E00;&#x8282;&#x70B9;&#x5F00;&#x59CB;&#x67E5;&#x627E;&#x76EE;&#x6807;&#x8282;&#x70B9;&#xFF0C;&#x65F6;&#x95F4;&#x590D;&#x6742;&#x5EA6;&#x4E3A; O(n)</strong></p>
<p><strong>&#x63D2;&#x5165;&#x6216;&#x5220;&#x9664;&#xFF1A;&#x5B83;&#x548C;&#x5355;&#x94FE;&#x8868;&#x4E00;&#x6837;&#xFF0C;&#x540E;&#x7EE7;&#x8282;&#x70B9;&#x63D2;&#x5165;&#x53CA;&#x5220;&#x9664;&#x7684;&#x65F6;&#x95F4;&#x590D;&#x6742;&#x5EA6;&#x4E3A; O(1)</strong></p>
<h3 id="&#x56DB;&#x3001;leetcode21&#xFF1A;&#x5408;&#x5E76;&#x4E24;&#x4E2A;&#x6709;&#x5E8F;&#x94FE;&#x8868;">&#x56DB;&#x3001;leetcode21&#xFF1A;&#x5408;&#x5E76;&#x4E24;&#x4E2A;&#x6709;&#x5E8F;&#x94FE;&#x8868;</h3>
<p>&#x5C06;&#x4E24;&#x4E2A;&#x5347;&#x5E8F;&#x94FE;&#x8868;&#x5408;&#x5E76;&#x4E3A;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x5347;&#x5E8F;&#x94FE;&#x8868;&#x5E76;&#x8FD4;&#x56DE;&#x3002;&#x65B0;&#x94FE;&#x8868;&#x662F;&#x901A;&#x8FC7;&#x62FC;&#x63A5;&#x7ED9;&#x5B9A;&#x7684;&#x4E24;&#x4E2A;&#x94FE;&#x8868;&#x7684;&#x6240;&#x6709;&#x8282;&#x70B9;&#x7EC4;&#x6210;&#x7684;&#x3002; </p>
<p><strong>&#x793A;&#x4F8B;&#xFF1A;</strong></p>
<pre class="language-"><code>&#x8F93;&#x5165;&#xFF1A;1-&gt;2-&gt;4, 1-&gt;3-&gt;4
&#x8F93;&#x51FA;&#xFF1A;1-&gt;1-&gt;2-&gt;3-&gt;4-&gt;4
</code></pre><p>&#x6B22;&#x8FCE;&#x5C06;&#x7B54;&#x6848;&#x63D0;&#x4EA4;&#x5230; <a href="https://github.com/sisterAn/JavaScript-Algorithms/issues/11" target="_blank">#11</a> </p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="LRU算法.html" class="navigation navigation-prev " aria-label="Previous page: LRU算法">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../Vue/" class="navigation navigation-next " aria-label="Next page: Vue知识点">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"链表原来如此简单","level":"1.5.5","depth":2,"next":{"title":"Vue知识点","level":"1.6","depth":1,"path":"Vue/README.md","ref":"Vue/README.md","articles":[{"title":"Proxy 基本使用与defineProperty","level":"1.6.1","depth":2,"path":"Vue/Proxy 基本使用与defineProperty.md","ref":"Vue/Proxy 基本使用与defineProperty.md","articles":[]},{"title":"面试题串讲_vue","level":"1.6.2","depth":2,"path":"Vue/面试题串讲_vue.md","ref":"Vue/面试题串讲_vue.md","articles":[]}]},"previous":{"title":"LRU算法","level":"1.5.4","depth":2,"path":"Algorithm/LRU算法.md","ref":"Algorithm/LRU算法.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github","donate","splitter","-anchor-navigation-ex","-sharing","sharing-plus","-highlight","prism","toggle-chapters","-lunr","-search","search-plus"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism.css"]},"github":{"url":"https://github.com/MarioGogogo"},"splitter":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"donate":{"alipay":"","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"http://7q5c2h.com1.z0.glb.clouddn.com/wechatpay.JPG","wechatText":"微信打赏"},"fontsettings":{"theme":"white","family":"serif","size":2},"anchor-navigation-ex":{"associatedWithSummary":false,"showLevel":true,"multipleH1":true,"mode":"float","pageTop":{"showLevelIcon":false,"level1Icon":"fa fa-hand-o-right","level2Icon":"fa fa-hand-o-right","level3Icon":"fa fa-hand-o-right"}},"sharing":{"qq":false,"all":["weibo","qq","qzone","google","douban"],"douban":false,"facebook":false,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":false,"vk":false,"pocket":false,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true},"toggle-chapters":{},"search-plus":{}},"theme":"default","author":"WuXiaolong","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"👨🏽‍💻前端漫游指南","language":"zh-hans","links":{"sidebar":{}},"gitbook":"3.2.3","description":"http://h5web.cc/"},"file":{"path":"Algorithm/链表原来如此简单.md","mtime":"2020-04-21T04:46:39.214Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-04-22T01:16:46.955Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

